3.250 \(\int \frac {\sqrt {\sec (c+d x)} (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx\)

Optimal. Leaf size=100 \[ \frac {\sqrt {2} (A-B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 B \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d} \]

[Out]

2*B*arcsinh(a^(1/2)*tan(d*x+c)/(a+a*sec(d*x+c))^(1/2))/d/a^(1/2)+(A-B)*arctanh(1/2*sin(d*x+c)*a^(1/2)*sec(d*x+
c)^(1/2)*2^(1/2)/(a+a*sec(d*x+c))^(1/2))*2^(1/2)/d/a^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.23, antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4023, 3808, 206, 3801, 215} \[ \frac {\sqrt {2} (A-B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 B \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d} \]

Antiderivative was successfully verified.

[In]

Int[(Sqrt[Sec[c + d*x]]*(A + B*Sec[c + d*x]))/Sqrt[a + a*Sec[c + d*x]],x]

[Out]

(2*B*ArcSinh[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/(Sqrt[a]*d) + (Sqrt[2]*(A - B)*ArcTanh[(Sqrt[a]
*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(Sqrt[2]*Sqrt[a + a*Sec[c + d*x]])])/(Sqrt[a]*d)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 215

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[(Rt[b, 2]*x)/Sqrt[a]]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rule 3801

Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(d_.)]*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[(-2*a*Sq
rt[(a*d)/b])/(b*f), Subst[Int[1/Sqrt[1 + x^2/a], x], x, (b*Cot[e + f*x])/Sqrt[a + b*Csc[e + f*x]]], x] /; Free
Q[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && GtQ[(a*d)/b, 0]

Rule 3808

Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(d_.)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[(-2*b*d)
/(a*f), Subst[Int[1/(2*b - d*x^2), x], x, (b*Cot[e + f*x])/(Sqrt[a + b*Csc[e + f*x]]*Sqrt[d*Csc[e + f*x]])], x
] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0]

Rule 4023

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Dist[(A*b - a*B)/b, Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^n, x], x] + Dist[B
/b, Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, A, B, m}, x] && NeQ[A
*b - a*B, 0] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {\sqrt {\sec (c+d x)} (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx &=(A-B) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx+\frac {B \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx}{a}\\ &=-\frac {(2 (A-B)) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}-\frac {(2 B) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a d}\\ &=\frac {2 B \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {\sqrt {2} (A-B) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.20, size = 95, normalized size = 0.95 \[ \frac {\tan (c+d x) \left (\sqrt {2} (B-A) \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right )-2 B \sin ^{-1}\left (\sqrt {\sec (c+d x)}\right )\right )}{d \sqrt {1-\sec (c+d x)} \sqrt {a (\sec (c+d x)+1)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[Sec[c + d*x]]*(A + B*Sec[c + d*x]))/Sqrt[a + a*Sec[c + d*x]],x]

[Out]

((-2*B*ArcSin[Sqrt[Sec[c + d*x]]] + Sqrt[2]*(-A + B)*ArcTan[(Sqrt[2]*Sqrt[Sec[c + d*x]])/Sqrt[1 - Sec[c + d*x]
]])*Tan[c + d*x])/(d*Sqrt[1 - Sec[c + d*x]]*Sqrt[a*(1 + Sec[c + d*x])])

________________________________________________________________________________________

fricas [A]  time = 0.52, size = 366, normalized size = 3.66 \[ \left [-\frac {\sqrt {2} {\left (A - B\right )} \sqrt {a} \log \left (-\frac {\cos \left (d x + c\right )^{2} + \frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{\sqrt {a}} - 2 \, \cos \left (d x + c\right ) - 3}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - B \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - \frac {4 \, {\left (\cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right )}{2 \, a d}, -\frac {\sqrt {2} {\left (A - B\right )} a \sqrt {-\frac {1}{a}} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \sqrt {\cos \left (d x + c\right )}}{\sin \left (d x + c\right )}\right ) - B \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right )}{a d}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sec(d*x+c))*sec(d*x+c)^(1/2)/(a+a*sec(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

[-1/2*(sqrt(2)*(A - B)*sqrt(a)*log(-(cos(d*x + c)^2 + 2*sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sqrt(c
os(d*x + c))*sin(d*x + c)/sqrt(a) - 2*cos(d*x + c) - 3)/(cos(d*x + c)^2 + 2*cos(d*x + c) + 1)) - B*sqrt(a)*log
((a*cos(d*x + c)^3 - 7*a*cos(d*x + c)^2 - 4*(cos(d*x + c)^2 - 2*cos(d*x + c))*sqrt(a)*sqrt((a*cos(d*x + c) + a
)/cos(d*x + c))*sin(d*x + c)/sqrt(cos(d*x + c)) + 8*a)/(cos(d*x + c)^3 + cos(d*x + c)^2)))/(a*d), -(sqrt(2)*(A
 - B)*a*sqrt(-1/a)*arctan(sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sqrt(-1/a)*sqrt(cos(d*x + c))/sin(d*
x + c)) - B*sqrt(-a)*arctan(2*sqrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sqrt(cos(d*x + c))*sin(d*x + c)
/(a*cos(d*x + c)^2 - a*cos(d*x + c) - 2*a)))/(a*d)]

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \sec \left (d x + c\right ) + A\right )} \sqrt {\sec \left (d x + c\right )}}{\sqrt {a \sec \left (d x + c\right ) + a}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sec(d*x+c))*sec(d*x+c)^(1/2)/(a+a*sec(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate((B*sec(d*x + c) + A)*sqrt(sec(d*x + c))/sqrt(a*sec(d*x + c) + a), x)

________________________________________________________________________________________

maple [B]  time = 2.35, size = 211, normalized size = 2.11 \[ \frac {\sqrt {\frac {1}{\cos \left (d x +c \right )}}\, \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \cos \left (d x +c \right ) \left (B \sqrt {2}\, \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos \left (d x +c \right )+1+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right )-B \sqrt {2}\, \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos \left (d x +c \right )+1-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right )+2 A \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right )-2 B \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right )\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )-1\right )}{2 d \sin \left (d x +c \right )^{2} a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*sec(d*x+c))*sec(d*x+c)^(1/2)/(a+a*sec(d*x+c))^(1/2),x)

[Out]

1/2/d*(1/cos(d*x+c))^(1/2)*(a*(1+cos(d*x+c))/cos(d*x+c))^(1/2)*cos(d*x+c)*(B*2^(1/2)*arctan(1/4*(-2/(1+cos(d*x
+c)))^(1/2)*(cos(d*x+c)+1+sin(d*x+c))*2^(1/2))-B*2^(1/2)*arctan(1/4*(-2/(1+cos(d*x+c)))^(1/2)*(cos(d*x+c)+1-si
n(d*x+c))*2^(1/2))+2*A*arctan(1/2*sin(d*x+c)*(-2/(1+cos(d*x+c)))^(1/2))-2*B*arctan(1/2*sin(d*x+c)*(-2/(1+cos(d
*x+c)))^(1/2)))*(-2/(1+cos(d*x+c)))^(1/2)/sin(d*x+c)^2*(cos(d*x+c)^2-1)/a

________________________________________________________________________________________

maxima [B]  time = 1.58, size = 567, normalized size = 5.67 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sec(d*x+c))*sec(d*x+c)^(1/2)/(a+a*sec(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

1/2*((sqrt(2)*log(cos(1/2*d*x + 1/2*c)^2 + sin(1/2*d*x + 1/2*c)^2 + 2*sin(1/2*d*x + 1/2*c) + 1) - sqrt(2)*log(
cos(1/2*d*x + 1/2*c)^2 + sin(1/2*d*x + 1/2*c)^2 - 2*sin(1/2*d*x + 1/2*c) + 1))*A/sqrt(a) - (sqrt(2)*log(cos(1/
2*arctan2(sin(d*x + c), cos(d*x + c)))^2 + sin(1/2*arctan2(sin(d*x + c), cos(d*x + c)))^2 + 2*sin(1/2*arctan2(
sin(d*x + c), cos(d*x + c))) + 1) - sqrt(2)*log(cos(1/2*arctan2(sin(d*x + c), cos(d*x + c)))^2 + sin(1/2*arcta
n2(sin(d*x + c), cos(d*x + c)))^2 - 2*sin(1/2*arctan2(sin(d*x + c), cos(d*x + c))) + 1) - log(2*cos(1/2*arctan
2(sin(d*x + c), cos(d*x + c)))^2 + 2*sin(1/2*arctan2(sin(d*x + c), cos(d*x + c)))^2 + 2*sqrt(2)*cos(1/2*arctan
2(sin(d*x + c), cos(d*x + c))) + 2*sqrt(2)*sin(1/2*arctan2(sin(d*x + c), cos(d*x + c))) + 2) + log(2*cos(1/2*a
rctan2(sin(d*x + c), cos(d*x + c)))^2 + 2*sin(1/2*arctan2(sin(d*x + c), cos(d*x + c)))^2 + 2*sqrt(2)*cos(1/2*a
rctan2(sin(d*x + c), cos(d*x + c))) - 2*sqrt(2)*sin(1/2*arctan2(sin(d*x + c), cos(d*x + c))) + 2) - log(2*cos(
1/2*arctan2(sin(d*x + c), cos(d*x + c)))^2 + 2*sin(1/2*arctan2(sin(d*x + c), cos(d*x + c)))^2 - 2*sqrt(2)*cos(
1/2*arctan2(sin(d*x + c), cos(d*x + c))) + 2*sqrt(2)*sin(1/2*arctan2(sin(d*x + c), cos(d*x + c))) + 2) + log(2
*cos(1/2*arctan2(sin(d*x + c), cos(d*x + c)))^2 + 2*sin(1/2*arctan2(sin(d*x + c), cos(d*x + c)))^2 - 2*sqrt(2)
*cos(1/2*arctan2(sin(d*x + c), cos(d*x + c))) - 2*sqrt(2)*sin(1/2*arctan2(sin(d*x + c), cos(d*x + c))) + 2))*B
/sqrt(a))/d

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}}{\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B/cos(c + d*x))*(1/cos(c + d*x))^(1/2))/(a + a/cos(c + d*x))^(1/2),x)

[Out]

int(((A + B/cos(c + d*x))*(1/cos(c + d*x))^(1/2))/(a + a/cos(c + d*x))^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + B \sec {\left (c + d x \right )}\right ) \sqrt {\sec {\left (c + d x \right )}}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sec(d*x+c))*sec(d*x+c)**(1/2)/(a+a*sec(d*x+c))**(1/2),x)

[Out]

Integral((A + B*sec(c + d*x))*sqrt(sec(c + d*x))/sqrt(a*(sec(c + d*x) + 1)), x)

________________________________________________________________________________________